home *** CD-ROM | disk | FTP | other *** search
- function onReplyList(success)
- {
- switch(replyListServer.status)
- {
- case 0:
- msg = "No error; parse was completed successfully.";
- break;
- case -2:
- msg = "A CDATA section was not properly terminated.";
- break;
- case -3:
- msg = "The XML declaration was not properly terminated.";
- break;
- case -4:
- msg = "The DOCTYPE declaration was not properly terminated.";
- break;
- case -5:
- msg = "A comment was not properly terminated.";
- break;
- case -6:
- msg = "An XML element was malformed.";
- break;
- case -7:
- msg = "Out of memory.";
- break;
- case -8:
- msg = "An attribute value was not properly terminated.";
- break;
- case -9:
- msg = "A start-tag was not matched with an end-tag.";
- break;
- case -10:
- msg = "An end-tag was encountered without a matching start-tag";
- }
- replyRoot = replyListServer.firstChild;
- rowNum = replyRoot.childNodes.length;
- if(success)
- {
- var _loc1_ = 0;
- while(_loc1_ < rowNum)
- {
- score = Number(replyRoot.childNodes[_loc1_].attributes.score);
- var _loc3_ = String(Math.floor(score / 6000));
- _loc3_ = _loc3_.length != 1 ? _loc3_ : (_loc3_ = "0" + _loc3_);
- var _loc4_ = String(Math.floor(score / 100) % 60);
- _loc4_ = _loc4_.length != 1 ? _loc4_ : (_loc4_ = "0" + _loc4_);
- var _loc2_ = String(score % 100);
- _loc2_ = _loc2_.length != 1 ? _loc2_ : (_loc2_ = "0" + _loc2_);
- time = _loc3_ + ":" + _loc4_ + ":" + _loc2_;
- topPane.content.attachMovie("dataRow","row" + _loc1_,_loc1_ + 1,{_y:_loc1_ * 19,_x:0,rank:_loc1_ + 1 + ".",nev:replyRoot.childNodes[_loc1_].attributes.name,ido:time});
- _loc1_ = _loc1_ + 1;
- }
- topPane.invalidate();
- }
- else
- {
- trace("------hiba az XML betoltesenel!");
- }
- }
- function getList(clientid, password)
- {
- listServer = new XML();
- listServer.xmlDecl = " <?xml version=\'1.0\' encoding=\'UTF-8\' ?>";
- listServerElement = listServer.createElement("ask");
- listServer.appendChild(listServerElement);
- listElement = listServer.createElement("data");
- listElement.attributes.action = "get_highscore";
- listServerElement.appendChild(listElement);
- listServer.sendAndLoad("processor.php",replyListServer);
- }
- topPane.setStyle("borderStyle","none");
- topPane.setStyle("borderColor",80997);
- topPane.setStyle("borderCapColor",80997);
- topPane.setStyle("buttonColor",80997);
- topPane.setStyle("borderHighlight",96205);
- topPane.setStyle("borderShadow",80997);
- topPane.setStyle("buttonColor",80997);
- system.useCodePage = false;
- replyListServer = new XML();
- replyListServer.ignoreWhite = true;
- replyListServer.onLoad = onReplyList;
- getList();
- stop();
-